import ajax from '@/uitls/ajax.js'

// 微信登录/获取token
export const login = (data) => {
  return ajax.get('/api/web/user/login', data, { loading: true })
}

// 获取用户信息
export const getuser = (data) => {
  return ajax.get('/api/web/user/getuser', data, { loading: true })
}

// 获取任务状态信息
export const GetTask = (data) => {
  return ajax.get('/api/web/usertask/GetTask', data, { loading: true })
}

// 获取每月排行榜信息
export const GetMolnthlyRanking = (data) => {
  return ajax.get('/api/web/user/GetMolnthlyRanking', data, { loading: true })
}

// 获取徒弟列表
export const GetPrentices = (data) => {
  return ajax.get('/api/web/user/GetPrentices', data, { loading: true })
}

// 获取师徒收益信息
export const getprenticesstat = (data) => {
  return ajax.get('/api/web/user/getprenticesstat', data, { loading: true })
}

// 金币提现
export const Withdraw = (data) => {
  return ajax.post('/api/web/Reward/Withdraw', data, { loading: true })
}

// 奖励记录兑换记录等
export const GetRewardRecords = (data) => {
  return ajax.post('/api/web/Reward/GetRewardRecords', data, { loading: true })
}

// 查询未领取的红包 "月排行红包/阅读红包"
export const GetUnreceivedRedpackets = (data) => {
  return ajax.get('/api/web/Reward/GetUnreceivedRedpackets', data, { loading: true })
}

// 领取红包
export const ReceiveRedpacket = (data) => {
  return ajax.post('/api/web/Reward/ReceiveRedpacket', data, { loading: true })
}

// 领取红包
export const GetJsConfig = (data) => {
  return ajax.get('/api/web/user/GetJsConfig', data, { loading: true })
}
